package com.itheima.tilas.entity;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Data
@Component
public class Teacher {
    private String name;
    private int age;
    @Bean("zhangsan")
    public Teacher createTeacherOne(){
        Teacher teacher = new Teacher();
        teacher.setName("张三");
        teacher.setAge(30);
        return teacher;
    }

    @Bean("lisi")
    public Teacher createTeacherTwo() {
        Teacher teacher = new Teacher();
        teacher.setName("张四");
        teacher.setAge(28);
        return teacher;
    }


}
